home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Util / U-V / UseLogger.cpt / UseLog / card_2887.txt < prev    next >
Encoding:
Text File  |  1987-10-06  |  4.6 KB  |  194 lines

  1. -- card: 2887 from stack: in
  2. -- bmap block id: 7624
  3. -- flags: 0000
  4. -- background id: 2768
  5. -- name: Main Entry Card
  6. ----- HyperTalk script -----
  7. on deinstall
  8.   -- Script Deinstaller
  9.   -- Rich Taylor, 10/5/87
  10.   set cursor to 4 -- hourglass
  11.   -- grab destination from field
  12.   put card field "Where Install" into where
  13.   put script of where into sHolder
  14.   -- Now, delete all text ranges delimited by UseLog comments
  15.   put offset ("-- UseLog Begin", sHolder) into startOff
  16.   repeat while startOff <> 0
  17.     put offset ("-- UseLog End", sHolder) into endOff
  18.     -- Now, chop out all characters between startOff and endOff
  19.     put endOff - startOff into segLen
  20.     add 14 to segLen  -- length of "-- UseLog End"
  21.     repeat for segLen  -- zap it....
  22.       delete character startOff of sHolder
  23.     end repeat
  24.     -- prepare/test for next segment
  25.     put offset ("-- UseLog Begin", sHolder) into startOff
  26.   end repeat
  27.   -- stick result into destination......
  28.   set script of where to sHolder
  29.   set cursor to 1 -- browser hand
  30. end deinstall
  31.  
  32.  
  33. -- part 1 (button)
  34. -- low flags: 00
  35. -- high flags: 0002
  36. -- rect: left=236 top=105 right=134 bottom=280
  37. -- title width / last selected line: 0
  38. -- icon id / first selected line: 11045 / 11045
  39. -- text alignment: 1
  40. -- font id: 0
  41. -- text size: 12
  42. -- style flags: 0
  43. -- line height: 16
  44. -- part name: Home
  45. ----- HyperTalk script -----
  46. on mouseUp
  47.   go home
  48. end mouseUp
  49.  
  50.  
  51.  
  52. -- part 2 (button)
  53. -- low flags: 00
  54. -- high flags: A003
  55. -- rect: left=109 top=109 right=131 bottom=209
  56. -- title width / last selected line: 0
  57. -- icon id / first selected line: 0 / 0
  58. -- text alignment: 1
  59. -- font id: 0
  60. -- text size: 12
  61. -- style flags: 0
  62. -- line height: 16
  63. -- part name: Look At Log
  64. ----- HyperTalk script -----
  65. on mouseUp
  66.   go to card id 3821
  67. end mouseUp
  68.  
  69.  
  70.  
  71.  
  72. -- part 4 (button)
  73. -- low flags: 00
  74. -- high flags: 8000
  75. -- rect: left=332 top=101 right=150 bottom=372
  76. -- title width / last selected line: 0
  77. -- icon id / first selected line: 14767 / 14767
  78. -- text alignment: 1
  79. -- font id: 0
  80. -- text size: 12
  81. -- style flags: 0
  82. -- line height: 16
  83. -- part name: Help
  84. ----- HyperTalk script -----
  85. on mouseUp
  86.   go to card "Help 1"
  87. end mouseUp
  88.  
  89.  
  90.  
  91.  
  92. -- part 5 (button)
  93. -- low flags: 00
  94. -- high flags: A003
  95. -- rect: left=332 top=279 right=301 bottom=496
  96. -- title width / last selected line: 0
  97. -- icon id / first selected line: 0 / 0
  98. -- text alignment: 1
  99. -- font id: 0
  100. -- text size: 12
  101. -- style flags: 0
  102. -- line height: 16
  103. -- part name: De-Install Use Logging
  104. ----- HyperTalk script -----
  105. on mouseUp
  106.   deinstall
  107. end mouseUp
  108.  
  109.  
  110.  
  111. -- part 10 (button)
  112. -- low flags: 00
  113. -- high flags: A003
  114. -- rect: left=7 top=279 right=301 bottom=171
  115. -- title width / last selected line: 0
  116. -- icon id / first selected line: 0 / 0
  117. -- text alignment: 1
  118. -- font id: 0
  119. -- text size: 12
  120. -- style flags: 0
  121. -- line height: 16
  122. -- part name: Install Use Logging
  123. ----- HyperTalk script -----
  124. on mouseUp
  125.   -- Script Installer
  126.   -- Rich Taylor, 10/5/87
  127.   answer "Are you sure?" with "Yes" or "No"
  128.   if it is "No"
  129.   then exit mouseUp
  130.   -- get script to modify
  131.   put script of (card field "Where Install") into sHolder
  132.   -- step through fields of this background, installing each
  133.   go to next
  134.   put name of this background into sBkgnd
  135.   put sBkgnd into here
  136.   repeat while here = sBkgnd
  137.     -- copy field "Script Segment" into sHolder based on field "Where"
  138.     put card field "Where" into where
  139.     put last word of where into find
  140.     delete first char of find  -- zap opening quote
  141.     delete last char of find   -- zap closing quote
  142.     put offset(find, sHolder) into loc
  143.     if first word of where is "after"
  144.     then add length(find) to loc
  145.     if first word of where is "before"
  146.     then put card field "Script Segment" before character loc of sHolder
  147.   else put card field "Script Segment" after character loc of sHolder
  148.   -- next card, check background...
  149.   go to next
  150.   put name of this background into here
  151. end repeat
  152. go to first card
  153. set script of (card field "Where Install") to sHolder
  154. put "" into card field "Log" of card "Log Card"
  155. end mouseUp
  156.  
  157.  
  158.  
  159. -- part 11 (button)
  160. -- low flags: 00
  161. -- high flags: A003
  162. -- rect: left=173 top=314 right=336 bottom=336
  163. -- title width / last selected line: 0
  164. -- icon id / first selected line: 0 / 0
  165. -- text alignment: 1
  166. -- font id: 0
  167. -- text size: 12
  168. -- style flags: 0
  169. -- line height: 16
  170. -- part name: See Scripts
  171. ----- HyperTalk script -----
  172. on mouseUp
  173.   go to next
  174. end mouseUp
  175.  
  176.  
  177.  
  178. -- part 12 (field)
  179. -- low flags: 01
  180. -- high flags: 0004
  181. -- rect: left=187 top=281 right=300 bottom=318
  182. -- title width / last selected line: 0
  183. -- icon id / first selected line: 0 / 0
  184. -- text alignment: 1
  185. -- font id: 4
  186. -- text size: 12
  187. -- style flags: 0
  188. -- line height: 16
  189. -- part name: Where Install
  190.  
  191.  
  192. -- part contents for card part 12
  193. ----- text -----
  194. stack "Home"